package org.vaadin.addon.scrollpanel.demo;

import org.vaadin.addon.scrollpanel.ScrollPanel;

import com.vaadin.Application;
import com.vaadin.ui.*;

@SuppressWarnings("serial")
public class ScrollpanelApplication extends Application {
	@Override
	public void init() {
        setTheme("scrollpaneltheme");
		Window mainWindow = new Window("Scrollpanel Application");
		mainWindow.getContent().setHeight("70%");
		setMainWindow(mainWindow);
		
		final VerticalLayout l = new VerticalLayout();
		l.setWidth("1600px");
		for (int i = 0; i < 300; ++i) {
		    Label la = new Label("sajdlks afkljsda lfkasdjfkl dsfklsjadf ksadjflsadkfj adslfjasldfjas dlf" + i );
		    l.addComponent(la);
		}
		final ScrollPanel p = new ScrollPanel();
		p.setSizeFull();
		p.setContent(l);
		mainWindow.addComponent(p);
	}

}
